<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/axios.min.js"></script>
    <script src="/js/util.js"></script>
    <script>
        var id = getQuery("id");
        function findById(){
            axios.get("/role/findById",{
                params:{
                    id
                }
            }).then(e=>{
                var info = e.data;
                $("name").innerHTML =info.name;
                var str = "";
                for (var i=0;i<info.gradeList.length;i++){
                    str += info.gradeList[i].name+",";
                }
                $("gradeDiv").innerHTML = str;
            })
        }
        window.onload=function (){
            findById()
        }

    </script>
</head>
<body>
<h2>查看权限</h2>
角色名称:<span id="name"></span><br>
拥有权限:<div id="gradeDiv"></div>

</body>
</html>